@extends('layout.admin.index')
@section('content')
<body>
<div class="panel admin-panel">
  <!-- 子列表显示-管理员添加 -->
  <div class="panel-head" id="add"><strong><span class="icon-pencil-square-o"></span>{{ $title }}</strong></div>
  <div class="body-content">

    <!-- 管理员添加开始-跳转执行添加路由 -->
    <form method="post" class="form-x" action="/admin/admin/editpass" id="myform">  
    {{ csrf_field() }}
      <div class="form-group">
      </div>


      <!-- 添加用户名 -->
      <div class="form-group">
        <div class="label">
          <label>用户名：</label>
        </div>
        <div class="field">
          <input type="text" class="input w50" value="{{ session('admin_name') }}" name="admin_name" required disabled="disabled"/>
          <div class="tips"></div>
          <div style="color:#aac;margin-top:43px">(管理员用户名,用于登录后台)</div>
        </div>
      </div>

      <!-- 当前密码 -->
      <div class="form-group">
        <div class="label">
          <label>当前密码：</label>
        </div>
        <div class="field">
          <input type="password" class="input w50" value="" name="admin_pass" required/><font style="font-size:20px;color:red;">*</font>
          <div class="tips"></div>
        </div>
      </div>

      <!-- 新密码 -->
      <div class="form-group">
        <div class="label">
          <label>新密码：</label>
        </div>
        <div class="field">
          <input type="password" class="input w50" value="" name="new_pass" required id="pass"/>
          <div class="tips"></div>
        </div>
      </div>

      <!-- 确认密码 -->
      <div class="form-group">
        <div class="label">
          <label>确认密码：</label>
        </div>
        <div class="field">
          <input type="password" class="input w50" value="" name="new_pass" required  id="new_pass"/>
          <div class="tips"></div>
          <div id="tishi" style="margin-top:10px;"></div>
        </div>
      </div>
      <script type="text/javascript">
        $('#new_pass').blur(function(){
            if($('#pass').val() != $(this).val()){
                $('#tishi').html('<font color="red">　<img src="/images/cuo.png" alt="" width="18"/>新密码与确认密码不一致</font>');
                submit = false;
            }else{
                $('#tishi').html('<font color="green">　<img src="/images/dui.png" alt="" width="18"/>密码可以使用</font>');
                submit = true;
            }

        })
        $('#myform').submit(function(){
            return submit;
        })
      </script>
      <div class="form-group">
        <div class="label">
          <label></label>
        </div>
        <div class="field">
          <button class="button bg-main icon-check-square-o" type="submit"> 提交</button>
        </div>
      </div>
    </form>
    <!-- 管理员添加结束 -->
  </div>
</div>
</body>
@endsection